<?php get_template_part('templates/page', 'header'); ?>
<?php
$paged = 1;
if (get_query_var('paged')) {
    $paged = get_query_var('paged');
} elseif (get_query_var('page')) {
    $paged = get_query_var('page');
}
$args = array('paged' => $paged,
    'post_type' => 'post',
    'status' => 'publish');
query_posts($args);
?>
<?php while (have_posts()) : the_post(); ?>
    <?php get_template_part('templates/content', get_post_format()); ?>
<?php endwhile; ?>

<?php if ($wp_query->max_num_pages > 1) : ?>
    <nav class="post-nav">
        <ul class="pager">
            <li class="previous"><?php next_posts_link(__('&larr; 上页', 'roots')); ?></li>
            <li class="next"><?php previous_posts_link(__('下页 &rarr;', 'roots')); ?></li>
        </ul>
    </nav>
<?php endif; ?>
<?php wp_reset_query();; ?>
